package io.renren.modules.generator.controller;

import io.renren.common.utils.R;
import io.renren.modules.generator.service.DeviceCombalarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

/**
 * @author zhangxu
 * @create 2020/10/12
 * Description:
 */
@RestController
@RequestMapping("generator/devicecombalarm")
@Api("接口")
public class DeviceCombalarmController {
    @Autowired
    private DeviceCombalarmService deviceCombalarmService;
    /**
     * 列表
     */
    @RequestMapping("/chartlist")
    @ApiOperation("图表数据")
    public R chartlist(@RequestParam(name = "date") String dateStr) throws ParseException {
        return R.ok().put("chartlist", deviceCombalarmService.chartlist(dateStr));
    }
}
